<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:c="http://java.sun.com/jstl/core">
    <style type="text/css">
        .rf-tab-cnt{
            border-width: 1px 0px 0px 0px;
        }      
    </style>
    <rich:tabPanel switchType="client" id="tabPanel">
        <rich:tab header="用户密码修改"  >
            <h:form id="pwd">
                <h:panelGroup rendered="#{userPwdBean.showRight==false}">
                    <h:panelGroup rendered="#{userPwdBean.showNewInput==false}">
                        请输入旧密码 ：
                        <h:inputSecret value="#{userPwdBean.oldPassword}"/>
                        <a4j:commandButton action="#{userPwdBean.confOldPwd}" value="确认" render="pwd"/>
                        <br/>
                        <h:outputText value="#{userPwdBean.wrongMass}" style="color:red;font-size:10pt"/>
                    </h:panelGroup>
                    <h:panelGroup rendered="#{userPwdBean.showNewInput}">

                        密码由数字、字母或特殊符号组成，不能为空
                        <hr/>
                        <table border="0">
                            <tr>
                                <td>请输入新密码 ：</td>
                                <td>
                                    <h:inputSecret id="newPwd" value="#{userPwdBean.newPassword}"
                                                   validatorMessage="密码长度为6-24位">
                                        <f:validateLength minimum="1" maximum="24"/>
                                    </h:inputSecret>
                                </td>
                                <td>
                                    <rich:message for="newPwd"/>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    请确认新密码 ：
                                </td>
                                <td>
                                    <h:inputSecret value="#{userPwdBean.confPassword}"/>
                                </td>
                                <td>

                                </td>
                            </tr>
                        </table>
                        <br/>
                        <br/>
                        <a4j:commandButton action="#{userPwdBean.confNewPwd}"  value="提交" render="pwd" />
                        <br/>
                        <h:outputText value="#{userPwdBean.wrongMass}" style="color:red;font-size:10pt"/>
                    </h:panelGroup>
                </h:panelGroup>
                <rich:messages globalOnly="true"/>
                <h:panelGroup rendered="#{userPwdBean.showRight}">
                    <h:outputText value="修改成功" style="color:green;font-size:12pt"/>
                    <a4j:commandLink action="#{userPwdBean.confBack}"  value="重新修改" render="pwd" />
                </h:panelGroup>
            </h:form>
        </rich:tab>
    </rich:tabPanel>
</ui:composition>
